/*
    Kelompok    2
    Kelas       2
    Anggota :
    1. Yudha Wastu Prawira      / 13509002
    2. Robertus Theodore        / 13509008
    3. Rendy Bambang Junior     / 13509036
    4. Hartono Sulaiman Wijaya  / 13509046
    5. Daniel Prihartoni        / 13509088
    6. Raydhitya Yosep          / 13509092

*/

#ifndef _DWARF_H
#define _DWARF_H

#include "Farm.h"
#include "Farmer.h"
#include "Resource.h"

typedef int DwarfType;
typedef int DwarfStatus;

class Dwarf : public Farmer {
	public:
		//ctor, cctor, dtor, & oper=
		Dwarf();
		Dwarf(DwarfType);
		~Dwarf();
		void initialize(SaveInfo);

		//get & set
		//change dwarf's Status, status WAKE_UP / SLEEP
		void setStatus(DwarfStatus);
		//get dwarf status (WAKE_UP/SLEEP)
		DwarfStatus getStatus();
		//get dwarf type
		DwarfType getType();

		//method
		//Act based on dwarf type.
		int act(Farm&,DwarfType);

		//if terrain isHarvestable(in this case it will always harvestable), return balance based on return value of setHarvested.
		FruitType harvest(Farm&);

		//mendapat saveInfo dwarf
		void getSaveInfo(SaveInfo&);

	private:
		//attribute
		// Type of dwarf : WATERING_DWARF/HARVESTING_DWARF/SLASHING_DWARF
		DwarfType dwarfType;
		// Dwarf's current status : SLEEP/WAKE_UP
		DwarfStatus dwarfStatus;
		//method untuk merubah direction dwarf ketika mencari yang bisa dikerjakannya.
		void nextLook(Direction);

		};
#endif
